package com.weasel.im.common.channel;

import com.google.common.collect.Maps;

import java.util.Map;

/**
 * Created by Dylan on 2015/11/30.
 */
public class IMChannelGroups {


    private final static Map<String,IMChannelGroup> channelGroups = Maps.newConcurrentMap();

    /**
     *
     * @param channelGroupsName
     * @return
     */
    public IMChannelGroup getChannelGroup(String channelGroupsName){

        IMChannelGroup channelGroup = channelGroups.get(channelGroupsName);
        if(null == channelGroup){
            channelGroup = new IMChannelGroup();
            channelGroups.put(channelGroupsName,channelGroup);
        }
        return channelGroup;
    }

}
